Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(geq(X1, X2)) → A__GEQ(X1, X2)
MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__DIV(s(X), s(Y)) → A__GEQ(X, Y)
A__GEQ(s(X), s(Y)) → A__GEQ(X, Y)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
MARK(div(X1, X2)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(minus(X1, X2)) → A__MINUS(X1, X2)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__MINUS(s(X), s(Y)) → A__MINUS(X, Y)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(geq(X1, X2)) → A__GEQ(X1, X2)
MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__DIV(s(X), s(Y)) → A__GEQ(X, Y)
A__GEQ(s(X), s(Y)) → A__GEQ(X, Y)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
MARK(div(X1, X2)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(minus(X1, X2)) → A__MINUS(X1, X2)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__MINUS(s(X), s(Y)) → A__MINUS(X, Y)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

A__GEQ(s(X), s(Y)) → A__GEQ(X, Y)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

A__GEQ(s(X), s(Y)) → A__GEQ(X, Y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

A__MINUS(s(X), s(Y)) → A__MINUS(X, Y)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

A__MINUS(s(X), s(Y)) → A__MINUS(X, Y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(div(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
The remaining pairs can at least be oriented weakly.

MARK(div(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__DIV(x1, x2)) = 0   
POL(A__IF(x1, x2, x3)) = x2 + x3   
POL(MARK(x1)) = x1   
POL(a__div(x1, x2)) = 0   
POL(a__geq(x1, x2)) = 0   
POL(a__if(x1, x2, x3)) = 0   
POL(a__minus(x1, x2)) = 0   
POL(div(x1, x2)) = x1   
POL(false) = 0   
POL(geq(x1, x2)) = 0   
POL(if(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(mark(x1)) = 0   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = x1   
POL(true) = 0   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MARK(div(X1, X2)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule A__IF(false, X, Y) → MARK(Y) we obtained the following new rules:

A__IF(false, s(div(minus(y_3, y_4), s(y_5))), 0) → MARK(0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Instantiation
QDP
                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(div(X1, X2)) → MARK(X1)
A__IF(false, s(div(minus(y_3, y_4), s(y_5))), 0) → MARK(0)
MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Instantiation
                  ↳ QDP
                    ↳ DependencyGraphProof
QDP
                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(div(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(div(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__DIV(x1, x2)) = 1   
POL(A__IF(x1, x2, x3)) = x2   
POL(MARK(x1)) = x1   
POL(a__div(x1, x2)) = 0   
POL(a__geq(x1, x2)) = 0   
POL(a__if(x1, x2, x3)) = 0   
POL(a__minus(x1, x2)) = 0   
POL(div(x1, x2)) = 1 + x1   
POL(false) = 0   
POL(geq(x1, x2)) = 0   
POL(if(x1, x2, x3)) = 0   
POL(mark(x1)) = 0   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = x1   
POL(true) = 0   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Instantiation
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.

MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__DIV(x1, x2)) = 1 + x1   
POL(A__IF(x1, x2, x3)) = 1 + x2   
POL(MARK(x1)) = 1 + x1   
POL(a__div(x1, x2)) = x1   
POL(a__geq(x1, x2)) = 0   
POL(a__if(x1, x2, x3)) = x2 + x3   
POL(a__minus(x1, x2)) = 0   
POL(div(x1, x2)) = x1   
POL(false) = 0   
POL(geq(x1, x2)) = 0   
POL(if(x1, x2, x3)) = x2 + x3   
POL(mark(x1)) = x1   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [17] were oriented:

a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__minus(0, Y) → 0
a__div(0, s(Y)) → 0
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__geq(0, s(Y)) → false
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(s(X)) → s(mark(X))
mark(0) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
a__if(false, X, Y) → mark(Y)
a__if(true, X, Y) → mark(X)
a__geq(X1, X2) → geq(X1, X2)
a__minus(X1, X2) → minus(X1, X2)
mark(false) → false
mark(true) → true



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Instantiation
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__IF(true, X, Y) → MARK(X)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule A__IF(true, X, Y) → MARK(X) we obtained the following new rules:

A__IF(true, s(div(minus(y_3, y_4), s(y_5))), 0) → MARK(s(div(minus(y_3, y_4), s(y_5))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Instantiation
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ Instantiation
QDP
                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A__IF(true, s(div(minus(y_3, y_4), s(y_5))), 0) → MARK(s(div(minus(y_3, y_4), s(y_5))))
MARK(div(X1, X2)) → A__DIV(mark(X1), X2)
A__DIV(s(X), s(Y)) → A__IF(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)

The TRS R consists of the following rules:

a__minus(0, Y) → 0
a__minus(s(X), s(Y)) → a__minus(X, Y)
a__geq(X, 0) → true
a__geq(0, s(Y)) → false
a__geq(s(X), s(Y)) → a__geq(X, Y)
a__div(0, s(Y)) → 0
a__div(s(X), s(Y)) → a__if(a__geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(minus(X1, X2)) → a__minus(X1, X2)
mark(geq(X1, X2)) → a__geq(X1, X2)
mark(div(X1, X2)) → a__div(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__minus(X1, X2) → minus(X1, X2)
a__geq(X1, X2) → geq(X1, X2)
a__div(X1, X2) → div(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 3 less nodes.